package com.forezp.client.config;

import feign.Retryer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

/**
 * @author fangzhipeng
 * @date 2017/6/16.
 */
@Configuration
public class FeignConfig {

    @Bean
    public Retryer feignRetryer() {
        // 重试问隔为 100 毫秒，最大重试时间为1秒，重试次数为5次
        // return new Retryer.Default(100, TimeUnit.SECONDS.toMillis(1), 5);
        return new Retryer.Default();
    }
}
